package runtime.demo3.annotation;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * @Title: Constraints
 * @Description: (约束注解)
 * @return:
 */
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
public @interface Constraints {

    // 判断是否作为主键约束
    boolean primaryKey() default false;

    // 判断是否允许为null
    boolean allowNull() default false;

    // 判断是否唯一
    boolean unique() default false;
}
